<?php 
use_helper('Date');
?>
<h1>Events List</h1>

<table class="formed">
  <thead>
    <tr>
      <th>Id</th>
      <th>Name</th>
      <th>Beginning</th>
      <th>End</th>
      <th>Aktionen</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($events as $event): ?>
    <tr>
      <td><a href="<?php echo url_for('event/show?id='.$event->getId()) ?>"><?php echo $event->getId() ?></a></td>
      <td><?php echo $event->getName() ?></td>
      <td><?php echo format_date($event->getBeginning()) ?></td>
      <td><?php echo format_date($event->getEnd()) ?></td>
      <td><?php include_partial('event/event_actions', array('event' => $event))?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('event/new') ?>">New</a>
